<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Kalıtım Test</title>
</head>
<body>
	<script type="text/javascript" src="kijs/base/KIJS.js"></script>
	<script type="text/javascript">
		SuperType = function (name)
		{
			this.name = name;
			this.colors = ["red","blue","green"];
		}

		//inheritance
		KIJS.inherit(SuperType, Object, {

			/**
			 *
			 */
			sayName: function() {
				alert(this.name);
			}
		});
		
		//SuperType.prototype.sayName = function() {
		//	alert(this.name);
		//};
	
		SubType = function (name, age)
		{
			SubType.superclass.constructor.call(this, name);
			
			this.age = age;
		}
	
		//inheritance
		KIJS.inherit(SubType, SuperType, {

			/**
			 *
			 */
			sayAge: function() {
				alert(this.age);
			}
		});
	
		//SubType.prototype.sayAge = function() {
		//	alert(this.age);
		//}

		var ins1 = new SubType("Serdar", 24);
		ins1.colors.push("black");
		alert(ins1.colors);
		ins1.sayName();
		ins1.sayAge();

		
	</script>
</body>
</html>